package com.sun.listener;

import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

/**
 * @Author Sun
 * @Date 2020/4/23 17:30
 * @Version 1.0
 */
public class WinListner implements WindowListener {
    public void windowOpened(WindowEvent e) {

    }

    public void windowClosing(WindowEvent e) {
        System.out.println("关闭ing");
        System.exit(0);
    }

    public void windowClosed(WindowEvent e) {
        System.out.println("关闭ed");
    }

    public void windowIconified(WindowEvent e) {

    }

    public void windowDeiconified(WindowEvent e) {

    }

    public void windowActivated(WindowEvent e) {
        System.out.println("打开窗口");
    }

    public void windowDeactivated(WindowEvent e) {
        System.out.println("最小化窗口");
    }
}
